package shellstation;

import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;

public class PerformanceView1 {

    private JTable perfTable;
    private JFrame frame;
    private JPanel panel;
    private int u;
	public void PerformanceView() {

		String[] columnNames = {"Product Name","Quantity Sold"};
		Object[][] rowData = {
			{"2T", "876"},
			{"Advance", "236"},
			{"Helix", "213"},
			{"Rimula", "145"}
			};
                frame = new JFrame("Product Performance Report");
                frame.setSize(450, 350);
                frame.setVisible(true);
		frame.setResizable(false);

		perfTable = new JTable(rowData, columnNames);
		perfTable.setPreferredScrollableViewportSize(new Dimension(300,50));
		perfTable.setFillsViewportHeight(true);

		JScrollPane scrollPane = new JScrollPane(perfTable);

                panel = new JPanel();
                panel.add(scrollPane);
                frame.add(panel);
	}

        public void getuser(int u){
            this.u = u;
        }

}
